if __name__ == '__main__':
    base = int(input("请输入要转换的进制:"))
    number = int(input("请输入要转换的数值（1-1024）："))

    postion = [pow(base, i) for i in range(10, -1, -1)]
    print(postion)

    for i in range(len(postion)):
        if number - postion[i] >= 0:
            print(1, end="")
            number -= postion[i]
        else:
            print(0, end="")
